package com.woniuxy.controller;

import com.woniuxy.entity.RbacManager;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.ManagerLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 马宇航
 * @Todo: 登录controller，我们不走shiro，我们只返回token
 * @DateTime: 22/02/23/0023 下午 2:34
 * @Component: 成都蜗牛学苑
 **/
@RestController
public class ManagerLogin {
    @Autowired
    ManagerLoginService ManagerLoginService;
    @RequestMapping("/login")
    public ResponseEntity login(@RequestBody RbacManager rbacManager){
        //登录成功后，需要生成token返回给前端！
        return ManagerLoginService.login(rbacManager);
    }

}
